<?php 
	include_once('class/autoload.php');
	$controleur= new controleur();
	$requete = new PreparationREQ ($controleur-> GetConnectBD());
	$sth = $controleur->GetConnectBD()->prepare("SELECT * FROM eleve WHERE idecole=".$_SESSION['current_id']);

	$sth->execute();

	$rows = array();
	while ($r = $sth->fetch()) {
	   $rows[] =  array_map('utf8_encode_array', $r);
	}
	echo $Json=json_encode($rows);
	function utf8_encode_array($array) {
		return utf8_encode($array);
	}
?>

